<?php

namespace app\api\model;

use app\common\model\TimeModel;

class Order extends TimeModel
{

    protected $name = "mall_order";

    protected $deleteTime = "delete_time";

    protected $defaultSoftDelete=0;
    
    public function orderList(){
        return $this->hasMany('app\api\model\OrderSpec','order_id','id');
    }

    // 物流状态 {select}  (0:待发货 1:已发货 ,2:已完成)
    public function logisticsStatus(){
        return ['0'=>'待发货' ,'1'=>'待收货' ,'2'=>'已完成' ,'9'=>'已退款'];
    }
}